from selenium import webdriver
from selenium.webdriver.common.by import By
import time

driver = webdriver.Chrome()
driver.get("https://www.baidu.com")

print("title:",driver.title)
print("url",driver.current_url)

time.sleep(3)
driver.get("https://news.baidu.com")

print("title:",driver.title)
print("url:",driver.current_url)

time.sleep(3)
# 数量
# num = driver.find_element(By.CLASS_NAME,"nums").text
# print(num)

driver.quit()